﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="BookingMainPage.aspx.cs" Inherits="SWEN_HMS.BookingModule.BookingMainPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .auto-style2
        {
            font-family: Arial, Helvetica, sans-serif;
            font-size: 15px;
            padding: 2px;
            color: #000000;
        }
        .auto-style18
        {
            width: 244px;
        }
        .auto-style16
        {
            color: #000000;
        }
        .auto-style19
        {
            font-family: Arial, Helvetica, sans-serif;
            font-size: 15px;
            padding: 2px;
            color: #000000;
            width: 789px;
        }
        .auto-style20
        {
            text-align: left;
        }
        .auto-style22
        {
            width: 139px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" runat="server" contentplaceholderid="ContentPlaceHolder1">
        <asp:Panel ID="Panel1" runat="server" CssClass="auto-style2">
            <asp:Button ID="Create" runat="server" CausesValidation="False" CssClass="btnCSS" OnClick="Create_Click" Text="Create Booking" Width="260px" />
            <asp:Button ID="Update" runat="server" CausesValidation="False" CssClass="btnCSS" OnClick="Update_Click" Text="Update Booking" Width="260px" />
            <asp:Button ID="Delete" runat="server" CausesValidation="False" CssClass="btnCSS" OnClick="Delete_Click" Text="Delete Booking" Width="260px" />
            <br />
            <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
                <asp:View ID="View3" runat="server">
                </asp:View>
                <asp:View ID="View2" runat="server">
                    <br />
                    <span class="auto-style1">Update Booking</span><asp:ScriptManager ID="ScriptManager1" runat="server">
                    </asp:ScriptManager>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SWENdbConnectionString %>" SelectCommand="SELECT [firstName], [lastName], [contactNo], [roomNo], [roomType], [checkIn], [checkOut], [noOfDay], [noOfAdult], [noOfChild], [remarks] FROM [Booking]"></asp:SqlDataSource>
                    <br />
                    <br />
                    Select Booking ID:
                    <asp:DropDownList ID="bookingIDDDL" runat="server" DataSourceID="SqlDataSource1" DataTextField="bookingID" DataValueField="bookingID" CausesValidation="True">
                    </asp:DropDownList>
                    <asp:Button ID="search" runat="server" CausesValidation="False" CssClass="btnCSS" OnClick="search_Click" Text="Search" />
                    <br />
                    <table class="auto-style19">
                        <tr>
                            <td colspan="3">
                                <h3>Room information</h3>
                            </td>
                        </tr>
                        <tr>
                            <td class="auto-style22" style="color: #000000">Change Room Type:</td>
                            <td class="auto-style17" colspan="2">
                                <asp:DropDownList ID="roomType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="roomType_SelectedIndexChanged" Width="200px">
                                    <asp:ListItem>Please Select Room Type</asp:ListItem>
                                    <asp:ListItem>Classic Suite</asp:ListItem>
                                    <asp:ListItem>Deluxe Room</asp:ListItem>
                                    <asp:ListItem>Executive Suite</asp:ListItem>
                                    <asp:ListItem>Grand Executive Suite</asp:ListItem>
                                    <asp:ListItem>Superior Room</asp:ListItem>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="roomVali" runat="server" ControlToValidate="roomType" Display="Dynamic" ErrorMessage="Please select room type" Font-Size="10pt" ForeColor="Red" InitialValue="Please Select Room Type"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="auto-style22" style="color: #000000">Current Room:</td>
                            <td class="auto-style20" colspan="2">
                                <asp:TextBox ID="oldRoom" runat="server" AutoPostBack="True" ReadOnly="True" Width="45px"></asp:TextBox>
                                New Room:
                                <asp:DropDownList ID="newRoom" runat="server" Width="65px">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="auto-style22" style="color: #000000">Number of Adult:</td>
                            <td class="auto-style18">
                                <asp:TextBox ID="noAdult" runat="server" TextMode="Number" Width="50px"></asp:TextBox>
                                <ajaxToolkit:FilteredTextBoxExtender ID="noAdult_FilteredTextBoxExtender" runat="server" FilterType="Numbers" TargetControlID="noAdult">
                                </ajaxToolkit:FilteredTextBoxExtender>
                                <asp:RequiredFieldValidator ID="adultVali" runat="server" ControlToValidate="noAdult" Display="Dynamic" ErrorMessage="Please enter no. of adult" Font-Size="10pt" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                            <td>&nbsp;</td>
                        </tr>
                        <tr>
                            <td class="auto-style22" style="color: #000000"><span class="auto-style16">Number of Child:</span></td>
                            <td class="auto-style18">
                                <asp:TextBox ID="noChild" runat="server" TextMode="Number" Width="50px"></asp:TextBox>
                                <ajaxToolkit:FilteredTextBoxExtender ID="noChild_FilteredTextBoxExtender" runat="server" FilterType="Numbers" TargetControlID="noChild">
                                </ajaxToolkit:FilteredTextBoxExtender>
                                <asp:RequiredFieldValidator ID="childVali" runat="server" ControlToValidate="noChild" Display="Dynamic" ErrorMessage="Please enter no. of child" Font-Size="10pt" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                            <td>&nbsp;</td>
                        </tr>
                        <tr>
                            <td class="auto-style22" style="color: #000000">Check In Date:</td>
                            <td class="auto-style18">
                                <asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" Height="180px" OnDayRender="Calendar1_DayRender" OnSelectionChanged="Calendar1_SelectionChanged" Width="200px">
                                    <DayHeaderStyle BackColor="#FFFF99" Font-Bold="True" Font-Size="7pt" />
                                    <NextPrevStyle VerticalAlign="Bottom" />
                                    <OtherMonthDayStyle ForeColor="#808080" />
                                    <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
                                    <SelectorStyle BackColor="#CCCCCC" />
                                    <TitleStyle BackColor="#FFCC66" BorderColor="Black" Font-Bold="True" />
                                    <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
                                    <WeekendDayStyle BackColor="#FFFFCC" />
                                </asp:Calendar>
                                <br />
                                <asp:TextBox ID="checkInDate" runat="server" ReadOnly="True"></asp:TextBox>
                                <br />
                                <asp:RequiredFieldValidator ID="checkInDateVali" runat="server" ControlToValidate="checkInDate" ErrorMessage="Please select date" Font-Size="10pt" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                            <td><span class="auto-style16">Check Out Date:
                                <asp:Label ID="checkOutDate" runat="server" Text="Label" Visible="False"></asp:Label>
                                <br />
                                Duration of Stay:
                                <asp:TextBox ID="durationOfStay" runat="server" TextMode="Number" ValidationGroup="durationValit" Width="50px"></asp:TextBox>
                                <ajaxToolkit:FilteredTextBoxExtender ID="durationOfStay_FilteredTextBoxExtender" runat="server" FilterType="Numbers" TargetControlID="durationOfStay">
                                </ajaxToolkit:FilteredTextBoxExtender>
                                &nbsp;days<br />
                                <asp:RequiredFieldValidator ID="durationVali" runat="server" ControlToValidate="durationOfStay" ErrorMessage="Please enter duration" Font-Size="10pt" ForeColor="Red" ValidationGroup="durationValit"></asp:RequiredFieldValidator>
                                <br />
                                <br />
                                <asp:Button ID="countCOD" runat="server" OnClick="countCOD_Click" Text="Generate " ValidationGroup="durationValit" />
                                </span></td>
                        </tr>
                        <tr>
                            <td colspan="3">&nbsp;</td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <asp:Button ID="tbxUpdate" runat="server" CssClass="btnCSS" OnClick="tbxUpdate_Click" Text="Update" />
                                <asp:Button ID="cancel" runat="server" CausesValidation="False" CssClass="btnCSS" OnClick="cancel_Click" Text="Cancel" />
                            </td>
                        </tr>
                    </table>
                    <br />
                </asp:View>
                <asp:View ID="View1" runat="server">
                    <br />
                    <span class="auto-style1">Delete Booking<br /> </span><span>
                    <br />
                    Select Booking ID:
                    <asp:DropDownList ID="bookingIDDDL2" runat="server" DataSourceID="SqlDataSource1" DataTextField="bookingID" DataValueField="bookingID" AutoPostBack="True">
                    </asp:DropDownList>
                    <asp:Button ID="search2" runat="server" CssClass="btnCSS" OnClick="search2_Click" Text="Search" />
                    <br />
                    <br />
                    </span>
                    <asp:Panel ID="Panel2" runat="server" Visible="False">
                        <span class="auto-style20">Selected Booking
                        <br />
                        <br />
                        Guest Name: <strong>
                        <asp:Label ID="first" runat="server" Text="Label"></asp:Label>
                        <asp:Label ID="last" runat="server" Text="Label"></asp:Label>
                        </strong>&nbsp;<br /> Booking ID:&nbsp;<asp:Label ID="bookingID" runat="server" Font-Bold="True" Text="Label"></asp:Label>
                        &nbsp;<br /> Room No:
                        <asp:Label ID="roomNo" runat="server" Font-Bold="True" Text="Label"></asp:Label>
                        <br />
                        Check In Date:
                        <asp:Label ID="checkInD" runat="server" Font-Bold="True" Text="Label"></asp:Label>
                        &nbsp;<br /> Check Out Date:
                        <asp:Label ID="checkOutD" runat="server" Font-Bold="True" Text="Label"></asp:Label>
                        <br />
                        <br />
                        </span>
                        <asp:Button ID="deleteBooking" runat="server" CssClass="btnCSS" OnClick="deleteBooking_Click" Text="Delete" />
                    </asp:Panel>
                    <br />
                </asp:View>
            </asp:MultiView>
            <br />
        </asp:Panel>
    </asp:Content>
<asp:Content ID="Content3" runat="server" contentplaceholderid="pageTitlePHolder">
</asp:Content>


